<?php 
defined('RUN_KATANA') or die('Restricted access');
if(count($shop->CurrentProduct->getVariations()) > 1)
{
	if(count($shop->CurrentProduct->getAttributes()) > 0)
	{ require($shop->getViewPath().'elements/attributes.php'); }
	else
	{
		?>
		<form id="var_select_form" name="var_select" action="" method="post" enctype="multipart/form-data" style="margin:0px;">
		<table border="0" cellpadding="0" cellspacing="0" class="attributes">
			<tr>
				<?php /* 
				<td valign="top"><strong>Varianter</strong></td>
				<td valign="top">&nbsp;&nbsp;:&nbsp;&nbsp;</td> */?>
				<td valign="top">
					<?php 
					$displayPrices = 0;
					foreach($shop->CurrentProduct->Variations as $variation)
					{
						if($shop->CurrentProduct->Variations[$shop->CurrentProduct->getFirstVariationId()]->getStdPrice() != $variation->getStdPrice())
						{ $displayPrices = 1; }
					}
					foreach($shop->CurrentProduct->Variations as $variation)
					{
						if($variation->getActive() > 0)
						{
							$selected = '';
							if($shop->CurrentProduct->getCurrentVariationId() == $variation->getId()) 
							{ $selected = 'checked="checked"'; }
							echo '<input class="varselect" onchange="submit();" onclick="submit();" type="radio" name="variation" '.$selected.'  value="'.$variation->getId().'" /> ';
							echo '<span class="value">'.$variation->getVarTitle();
	
							if($displayPrices)
							{ echo ' kr.&nbsp;'.$variation->getStdPrice(true, 0, false).',-'; }
	
							echo '</span>';
							echo '<br />';
						}
					}
					?>
				</td>
			</tr>
		</table>
		</form>
		<?php
	}
}
?>